package com.fms.data.logger;

import com.fms.model.ILogger;

public class Logger implements ILogger
{
	
	
	public void log(String message)
	{
		StackTraceElement callingClass = new Throwable().fillInStackTrace().getStackTrace()[1];

		System.out.println( callingClass.getClassName() + 
							"." + 
							callingClass.getMethodName() + "()" +
							" - " + message);
	}

	@Override
	public void error(String message)
	{
		StackTraceElement callingClass = new Throwable().fillInStackTrace().getStackTrace()[1];

		System.out.println( callingClass.getClassName() + 
							"." + 
							callingClass.getMethodName() + "()" +
							" - " + message);
	}
	
	
}
